import request from '@/utils/request'

export default {
    //获取医院列表
    getHospList(current, limit, searchObj){
        return request({
            url: `/admin/hosp/hospital/list/${current}/${limit}`,
            method: 'get',
            params: searchObj
        });
    },
    //根据dictCode查询所有子节点
    getByDictCode(dictCode){
        return request({
            url: `/admin/cmn/dict/getByDictCode/${dictCode}`,
            method: 'get'
        });
    },
    //根据parent查询子节点
    findByParentId(parentId){
        return request({
            url: `/admin/cmn/dict/findChildData/${parentId}`,
            method: 'get'
        });
    },
    //修改医院状态
    updateHospStatus(id, status){
        return request({
            url: `/admin/hosp/hospital/updateHospStatus/${id}/${status}`,
            method: 'get'
        });
    },
    //查询医院详情
    getHospitalById(id){
        return request({
            url: `/admin/hosp/hospital/getHospitalById/${id}`,
            method: 'get'
        });
    },
    //查询科室列表
    getDeptByHoscode(hoscode){
        return request({
            url: `/admin/hosp/department/getDeptList/${hoscode}`,
            method: 'get'
        });
    },
    //查询值班信息
    getScheduleRule(page, limit, hopcode, depcode){
        return request({
            url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hopcode}/${depcode}`,
            method: 'get'
        });
    },
    //查询排班详细信息
    getScheduleDetail(hopcode, depcode, workDate){
        return request({
            url: `/admin/hosp/schedule/getScheduleDetail/${hopcode}/${depcode}/${workDate}`,
            method: 'get'
        });
    }
}